package com.fzy.core.system.service;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;
import com.fzy.core.U;

public class PropertyListMapper implements RowMapper {

	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		PropertyListVo vo = new PropertyListVo();
		vo.setId(U.getRsLong("id", rs));
		vo.setName(rs.getString("name"));
		vo.setNameShow(rs.getString("name_show"));
		vo.setPropertyType(rs.getString("property_type"));
		vo.setColumnName(rs.getString("column_name"));
		vo.setIsNotNull(rs.getString("is_not_null"));
		vo.setDefaultValue(rs.getString("default_value"));
		vo.setIsKey(rs.getString("is_key"));
		vo.setSequenceName(rs.getString("sequence_name"));
		vo.setCommentText(rs.getString("comment_text"));
		vo.setIsUnique(rs.getString("is_unique"));
		vo.setLengthValue(U.getRsLong("length_value", rs));
		vo.setPrecisionValue(U.getRsLong("precision_value", rs));
		vo.setScaleValue(U.getRsLong("scale_value", rs));
		vo.setIsShow(rs.getString("is_show"));
		vo.setIsWork(rs.getString("is_work"));
		vo.setIsQuery(rs.getString("is_query"));
		vo.setDictType(rs.getString("dict_type"));
		vo.setRefEntity(rs.getString("ref_entity"));
		vo.setRefProperty(rs.getString("ref_property"));
		vo.setRefTable(rs.getString("ref_table"));
		vo.setRefColumn(rs.getString("ref_column"));
		vo.setEntityId(U.getRsLong("entity_id", rs));
		return vo;
	}

}
